Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "bar-series">
With this node you can add a bar graph to an existing dashboard or a new one created by the node to show bar series graph.
[
{
"metricId": [Service Uri Of A Sensor],
"metricHighLevelType": "Sensor",
"metricName": [The name of the Sensor],
"metricType": [A measure recorded by the sensor]
},
{
"metricId": [The ID of a KPI],
"metricHighLevelType": "MyKPI",
"metricName": [The name of the MyKPI],
"metricType": [The type of the measure saved in the KPI]
},
{
"metricId": "",
"metricHighLevelType": "Dynamic",
"metricName": [The name of the dynamic data],
"metricType": [The type of the dynamic data],
"metricValueUnit": [The unit of the dynamic data],
"measuredTime": [The ISO time of the measure of dynamic data],
"value": [A dynamic value]
}
]
You can insert an arbitrary number of MyKPI and Sensor element inside the array. An example of the JSON array filled with correct data:
[
{
"metricId": "http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3166540",
"metricHighLevelType": "Sensor",
"metricName": "tusc_weather_sensor_ow_3166540",
"metricType": "airTemperature"
},
{
"metricId": "http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3182522",
"metricHighLevelType": "Sensor",
"metricName": "tusc_weather_sensor_ow_3182522",
"metricType": "airTemperature"
},
{
"metricId": "17057447",
"metricHighLevelType": "MyKPI",
"metricName": "OBD2 - Intake Air Temperature",
"metricType": "Temperature"
},
{
"metricId": "17056579",
"metricHighLevelType": "MyKPI",
"metricName": "OBD2 - Intake Air Temperature",
"metricType": "Temperature"
},
{
"metricId": "",
"metricHighLevelType": "Dynamic",
"metricName": "BatteryGalaxyNote",
"metricType": "Temperature",
"metricValueUnit": "°C",
"measuredTime": "2019-11-21T14:51:00Z",
"value": 42
},
{
"metricId": "",
"metricHighLevelType": "Dynamic",
"metricName": "Storage",
"metricType": "Space",
"metricValueUnit": "Gb",
"measuredTime": "2019-11-21T14:51:00Z",
"value": 12
}
]